#ifndef __CAMERA_H_
#define __CAMERA_H_

#include "iic.h"
#include "pca9557.h"
#include "driver/ledc.h"
#include "esp_camera.h"

#define CAMERA_PIN_PWDN -1
#define CAMERA_PIN_RESET -1
#define CAMERA_PIN_XCLK      GPIO_NUM_5
#define CAMERA_PIN_SIOD      GPIO_NUM_1
#define CAMERA_PIN_SIOC      GPIO_NUM_2

#define CAMERA_PIN_D7        GPIO_NUM_9
#define CAMERA_PIN_D6        GPIO_NUM_4
#define CAMERA_PIN_D5        GPIO_NUM_6
#define CAMERA_PIN_D4        GPIO_NUM_15
#define CAMERA_PIN_D3        GPIO_NUM_17
#define CAMERA_PIN_D2        GPIO_NUM_8
#define CAMERA_PIN_D1        GPIO_NUM_18
#define CAMERA_PIN_D0        GPIO_NUM_16
#define CAMERA_PIN_VSYNC     GPIO_NUM_3
#define CAMERA_PIN_HREF      GPIO_NUM_46
#define CAMERA_PIN_PCLK      GPIO_NUM_7

#define XCLK_FREQ_HZ         24000000

void camera_init(i2c_obj_t self);

#endif